package com.rbac.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 角色实体类
 */
@Data
@TableName("sys_role")
@Tag(name = "SysRole", description = "角色实体类")
public class SysRole implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 角色ID
     */
    @Schema(name = "id", description = "角色ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 角色名称
     */
    @Schema(name = "roleName", description = "角色名称")
    private String roleName;

    /**
     * 角色编码
     */
    @Schema(name = "roleCode", description = "角色编码")
    private String roleCode;

    /**
     * 状态（0-禁用，1-正常）
     */
    @Schema(name = "status", description = "状态（0-禁用，1-正常）")
    private Integer status;

    /**
     * 是否删除（0-未删除，1-已删除）
     */
    @Schema(name = "deleted", description = "是否删除")
    @TableLogic
    private Integer deleted;

    /**
     * 创建时间
     */
    @Schema(name = "createTime", description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(name = "更新时间", description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    @Schema(name = "remark", description = "备注")
    private String remark;

    @Schema(name = "sortOrder", description = "排序")
    private Integer sortOrder;
}